package com.yixing.configuration.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/properties")
@RestController
public class PropertiesController {
    @Value("${yixing.key1}")
    private String key1;
    @Value("${yixing.key2}")
    private Integer key2;
    @RequestMapping("/readValue")
    public String readValue() {
        return "从Properties中读取配置文件，key1:" + key1 + ", key2:" + key2;
    }
}
